package cn.kgc.kgde.bookstore.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class EvaluationDTO{
    //评论表的字段
    @ApiModelProperty("评价id")
    @TableId(value = "evaluationId", type = IdType.AUTO)
    private Long evaluationId;

    @ApiModelProperty("评价用户id")
    private String userCode;

    @ApiModelProperty("商品id")
    private Long bookId;

    @ApiModelProperty("对应订单id")
    private String orderId;

    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    @ApiModelProperty("评价内容")
    private String evaluation;


    //book表的字段

    private Long id;

    @ApiModelProperty("书名")
    private String bookName;

    @ApiModelProperty("评论数")
    private String comments;

    @ApiModelProperty("作者")
    private String author;

    @ApiModelProperty("出版社")
    private String press;

    @ApiModelProperty("出版时间")
    private String publishingTime;

    @ApiModelProperty("价格")
    private String price;

    @ApiModelProperty("图片")
    private String bookPic;

    @ApiModelProperty("分类")
    private Integer category;

    @ApiModelProperty("状态")
    private Integer state;

    @ApiModelProperty("库存")
    private Integer stock;

}
